{% extends "base.html" %}

{% block main-content %}
      <div class="row">
        <div class="col-md-12">
          <div class="panel panel-default">
            <div class="panel-heading">
                编辑公众号
            </div>
            <div class="panel-body">
              <form id="wechat-edit-form" class="simple_form" action="{% url 'wechat.edit' wechat.id %}" method="post" >

                {% csrf_token %}
                <div class="form-group">
                  <div class="media wechat-item ">
                    <div class="media-left">
                        <img class="media-object avatar-list" src="{{ wechat.avatar }}" alt="{{ wechat.name }}">
                    </div>
                    <div class="media-body">
                      <h5 class="media-heading">{{wechat.name}} <span class="wechat-id">微信号: {{wechat.wechatid}}</span></h5>
                      <p class="intro">
                      {{wechat.intro}}
                      </p>
                    </div>
                    <div class="media-right">
                      <img class="media-object wechat-qrcode" src="{{ wechat.qrcode }}" alt="...">
                    </div>
                  </div>
                  <hr />
                </div>
                <div class="form-group">
                  <div class="input-group">
                    <label for="id_frequency" class="control-label">爬取频率</label>
                    <input id="id_frequency" type="number" class="form-control wechat-frequency" name="frequency" required placeholder="{{ wechat.frequency }}" value="{{ form.frequency.value }}">
                    <span>分钟</span>
                    <button type="submit" class="btn btn-primary" style="margin-left: 20px;">保存</button>
                  </div>
                </div>
              </form>

            </div>
          </div>

        </div>
      </div>
{% endblock %}